package edu.je.patent.repo;

/**
 * @author MengXin
 * @description:
 * @program: je-gateway
 * @date 2021/4/24 9:21
 * @mail mx@radish.cloud
 */


import edu.je.patent.model.PantentModel;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface PantentRepo extends JpaRepository<PantentModel,Long> {
    Page<PantentModel> findAll(Specification<PantentModel> pantentModelSpecification, Pageable pageable);

    @Query(value = "select p.country from PantentModel p")
    List<String> findAllCounry();


    Page<PantentModel> findAll(Pageable pageable);

    @Query(value = "select p.applicant from PantentModel p")
    List<String> findAllApplicant();

    List<PantentModel> findAll(Specification<PantentModel> querySpecifi);


}
